﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BLL;
using EntitiesLayer;
using System.Drawing;
using System.Text.RegularExpressions;
using DAL;
using DAL.Repositories;
namespace UnitTest
{
    class Program
    {
         static ConcreteGestor gestor = new ConcreteGestor();
        static void Main(string[] args)
        {
            decimal p;



            //Console.WriteLine(new Regex(@"^-?\d*([,.]\d*)?(?<=\d[,.]?)$").IsMatch("."));
            //Console.ReadLine();
            UnitOfWork.MissionRepository.GetById(11);
            Console.ReadLine();
            
        }

        public static void insertarConsultarEstrella() {
           

            gestor.insertarEstrella("Yo", 213,
                133, new TimeSpan(2), 23, "Lo que sea", 1323, 10);

            foreach (Estrella e in gestor.listarEstrella())
                Console.WriteLine(e);


            Console.ReadLine();
        }

        public static void insertarConsultarPlaneta() {

            gestor.insertarPlaneta("tierra", 3232, 32442,
            new TimeSpan(22), 234, new TimeSpan(22));

            foreach (Planeta e in gestor.listarPlaneta())
                Console.WriteLine(e);

            Console.ReadLine();

        }

        public static void insertarConsultarSalite() {

           // gestor.insertarSatelite("Titan", 232, 242,
            //new TimeSpan(4234), "blabla", );

            foreach (Satelite s in gestor.listarSatelite()) {

                Console.WriteLine(s);
            }

            Console.ReadLine();
        }

        public static void insertarConsultarMission() {


          //  gestor.insertarMission("baada", "ocho",
            //    DateTime.Now, new TimeSpan(24, 0, 0), "djijdw", "Exito",
              //  null, "Halcon", 20, 1);

            foreach (Mission m in gestor.listarMission())
                Console.WriteLine(m);

            Console.ReadLine();
        
        }

        public static void satelitesPlaneta(){

            foreach(Satelite s in gestor.satelitesDePlaneta(24))
                Console.WriteLine(s);

            Console.ReadLine();
        }

        public static void misionesProgramaEspacial(){

            foreach(Mission s in gestor.missionesDeProgramaEspacial(1))
                Console.WriteLine(s);
            
            Console.ReadLine();
        }

        public static void missionesCuerposCeleste(){
            foreach (Mission m in gestor.missionesDeCuerpoCeleste(20))
                Console.WriteLine(m);

            Console.ReadLine();

        }

       

        public static void listarRegistrarPrograma() {
            
            gestor.insertarPrograma("Mission Imposible", DateTime.Now, 
                DateTime.Now.AddDays(-5), "muy lejos");
            foreach (ProgramaEspacial p in gestor.listarPrograma())
                Console.WriteLine(p);

            Console.ReadLine();
        
        }

     

    }
}
